package edu.nf.bs.service.impl;

import com.github.pagehelper.PageInfo;
import edu.nf.bs.dao.DeliveryManMapper;
import edu.nf.bs.entity.DeliveryMan;
import edu.nf.bs.service.DeliveryService;

import java.util.List;

public class DeliveryServiceImpl implements DeliveryService {
    private DeliveryManMapper deliveryManMapper;

    public void setDeliveryManMapper(DeliveryManMapper deliveryManMapper) {
        this.deliveryManMapper = deliveryManMapper;
    }

    @Override
    public PageInfo<DeliveryMan> queryDeliveryMan(String deliveryManName,Integer pageNum, Integer pageSize) {
        //通过dao查询返回分页数据集合
        List<DeliveryMan> list = deliveryManMapper.queryDeliveryMan(deliveryManName,pageNum, pageSize);
        //封装分页信息对象
        PageInfo<DeliveryMan> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public List<String> queryDeliveryManId() {
       return  deliveryManMapper.queryDeliveryManId();
    }
}
